package com.ys.security.nodb.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HomeController {

    @GetMapping({"/", "/index", "/home"})
    public String root() {
        return "index";
    }

    @GetMapping("/login")
    public String login() {
        return "login";
    }

//    @GetMapping("/user_past")
//    @ResponseBody
//    public String user(@AuthenticationPrincipal Principal principal, Model model) {
//        model.addAttribute("username", principal.getName());
//        return "user_past_";
//    }

}
